<template>
  <div :id="application.id" class="application" :style="{ zIndex: application.zIndex() }">
    <window
      v-for="window in [...application.windowContext.windows.values()]"
      :key="window.id"
      :application="application"
      :window="window"
    />
  </div>
</template>

<script lang="ts" setup>
import Window from "../window/Window.vue"
import type BiuOS from "@/core/biu-os"

defineProps({
  application: {
    type: Object as () => BiuOS.Application,
    required: true
  }
})
</script>

<style scoped lang="scss">
.application {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}
</style>
